# -*- coding: utf-8 -*-
"""
author: linpeifeng
date: 2021年11月29日12:40
"""

"""
    获取给定范围内的质数
    params
        range_num: 范围上线
    :return
"""


def list_prime_num(rang_num: int) -> []:
    if rang_num <= 2:
        return []

    result_nums = []
    for idx in range(2, rang_num):
        is_prime_num = True
        for factor in range(2, idx):
            if idx % factor == 0:
                is_prime_num = False
                break
        if is_prime_num:
            result_nums.append(idx)

    return result_nums


if __name__ == "__main__":
    print(list_prime_num(100))
